using System.Data;
using DevExpress.Xpo;
using DevExpress.Xpo.DB;

namespace Tests
{
   internal static class TestCommon
   {
      #region Static Methods

      public static IDataLayer NewInMemoryDataLayer()
      {
         return new SimpleDataLayer(new InMemoryDataStore(new DataSet(), AutoCreateOption.DatabaseAndSchema));
      }

      public static IDataLayer NewPersistentDataLayer()
      {
         return XpoDefault.GetDataLayer(
            AccessConnectionProvider.GetConnectionString(@"c:\data\customer.mdb"),
            AutoCreateOption.DatabaseAndSchema);
      }

      #endregion
   }
}